#ifndef ITEMROOT_H
#define ITEMROOT_H


#include "models_global.h"
#include "AbstractItem.h"


class MODELSSHARED_EXPORT ItemRoot : public AbstractItem
{
    Q_OBJECT

public:

    ItemRoot(QObject *parent = 0);
    ItemRoot(const QString& name, QObject* parent = 0);

    void setFilePath(const QString& file_path);
    QString filePath() const;

    virtual int fieldCount() const;
    virtual QString fieldName(const int &data_type) const;
    virtual int field(const QString &field_name) const;

    bool isDirty() const;


public slots:

    void setDirty(const bool& dirty = true);


protected:

    virtual void setCustomData(const int &data_type, const QVariant &data);
    virtual QVariant customData(const int &data_type) const;


    bool m_dirty;
    QString m_filePath;


};

#endif // ITEMROOT_H
